/*
 * Copyright© 2013-2018 YZTC 
 * Author zhenghl 
 * 本公司保留所有下述内容的权利; 
 * 本内容为保密信息，仅限本公司内部使用; 
 * 非经本公司书面许可，任何人不得外泄或用于其他目的; 
*/
package com.wxmp.core.spring;
import org.springframework.context.ApplicationListener;
import org.springframework.context.event.ContextRefreshedEvent;
public class SpringBeanDefineConfigue implements ApplicationListener<ContextRefreshedEvent> {
	private SpringBeanDefineService appService;
	/**
	 * 当一个ApplicationContext被初始化或刷新触发
	 */
	@Override
	public void onApplicationEvent(ContextRefreshedEvent event) {
		if(event.getApplicationContext().getDisplayName().equals("Root WebApplicationContext")){
			if(appService != null){
				appService.initApplicationCacheData();
			}
        }  
	}
	public SpringBeanDefineService getAppService() {
		return appService;
	}
	public void setAppService(SpringBeanDefineService appService) {
		this.appService = appService;
	}
}
